package com.jxpanda.spring.module.auth.core.token;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.oauth2.jwt.JwtEncoderParameters;

public interface ReactiveJwtCustomizer {

    default <U extends UserDetails> ReactiveJwtEncodingContext<U> customize(ReactiveJwtEncodingContext<U> context) {
        return context;
    }

    default <U extends UserDetails> JwtEncoderParameters buildEncoderParameters(ReactiveJwtEncodingContext<U> context) {
        return this.customize(context).build();
    }

}
